#include<stdio.h>
#include<string.h>

#define search "chi1 huo3 guo1"

int main()
{
    char info[100][100], tempt[15];
    int count = 0, i = 0, j = 0, place = 0;
    
    gets(info[i]);
    
    while(strcmp(info[i], ".") != 0)
    {
    	for(j = 0; j < strlen(info[i]); j++)
    	{
    		if(info[i][j] == 'c')
    		{
    			strncpy(tempt, &info[i][j], 14);
    			tempt[14] = '\0';
    			if(strcmp(tempt, search) == 0)
    			{
    				count++; //was found
    				if(count == 1)
    				{
    					place = i; //record first place
    				}
    				break;
    			}
    		}
    	}
    	i++; //next line
    	gets(info[i]);
    }
    
    printf("%d\n", i);
    
	if(count == 0)
	{
		printf("-_-#");
	}
	else
	{
		printf("%d %d", place+1, count);
	}

    return 0;
}
